package team.zero.lemon.module.sys.dao;

import team.zero.lemon.module.sys.entity.UserRole;
import team.zero.lemon.common.persistence.ICrudDao;
import team.zero.lemon.common.persistence.annotation.MyBatisDao;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by bolin on 2016/4/27.
 */
@MyBatisDao
public interface IUserRoleDao extends ICrudDao<UserRole> {
    List<UserRole> findByRoleId(@Param("roleId") int roleId);
    List<UserRole> findByUserId(@Param("userId") int userId);


    @Deprecated
    public int deleteByRoleId(@Param("roleId") int roleId);
    @Deprecated
    public int deleteByUserId(@Param("userId") int userId);

}
